<template>
    <d2-container class="openUrl" type="ghost">
        <el-alert title="此页面在切换其他页面再回到本页面时数据会被刷新，所以建议请及时保存或确认操作完成后再切换页面！" 
                type="warning" effect="dark" @click="size=5">
        </el-alert>
        <iframe :src="url" frameborder="0" width="100%" :style="`height: calc( 100% - ${size}px);`"></iframe>
    </d2-container>
</template>
<script>
var name = "openUrl";
export default {
    name: "openUrl",
    mounted() {
        if (this.url != this.$route.meta.url) this.url = this.$route.meta.url;
    },
    data() {
        return {
            url: "",
            size: 40,
        };
    },
};
</script>
<style>
</style>